<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>list</title>

<style type="text/css">
	#div01{
		width:100px;
		height:100px;
		border:1px solid red;
		color:red;
	}
	
	#userTable{
	border:1px solid red;
	}
</style>
</head>
<body>

<div id="div01">

</div>

<div id="userDiv">
	<table id="userTable">
		<tr>
			<td>id</td>
			<td>手机号码</td>
			<td>密码</td>
		</tr>
	</table>
		

</div>




</body>

<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.4.js" ></script>
<script>
	$(function(){
		//后台发送请求，然后拿到游戏币
		$.ajax({
			'type':'post',
			'url':'${pageContext.request.contextPath}/user?method=findWithPage',
			'data':{
				'currentPage':1,
				'page':3,
			},
			'success':function(jsonData){
				//
				conlose.log(jsonData.palyCoin)
				var play=jsonData.palyCoin;
				$('#div01').html(play);
				
				var user=jsonData.user;
				var id=user.id;
				var phone=user.phone;
				var password =user.password;
				
				//逻辑思路 在table插入1个tr
				
				//1
				var td01= $("<td>"+id+"</td>");
				var td02= $("<td>"+phone+"</td>");
				var td03= $("<td>"+password+"</td>");
				
				var tr01= $("<tr></tr>");
				tr.append(td01);
				tr.append(td02);
				tr.append(td03);
				
				$('#userTable').append(tr);
				
				
				
			},
			'dataType':'json',
		});
		
	});


</script>
</html>